import React from 'react';
import {View, TouchableOpacity} from 'react-native';
import {useSafeState} from 'ahooks';
import {Text, BottomSheet} from '@rneui/base';
import style from './SetSort.less';
export default ({iconKey = '', onChangeIconKey = () => {}}) => {
  const [isVisible, setIsVisible] = useSafeState(false);
  return (
    <>
      <TouchableOpacity onPress={() => setIsVisible(true)}>
        <Text>OIK</Text>
      </TouchableOpacity>
      <BottomSheet
        modalProps={{}}
        isVisible={isVisible}
        onBackdropPress={() => {
          setIsVisible(false);
        }}>
        <View style={style.box}>
          <Text h4>排序方式</Text>
          <TouchableOpacity>
            <View style={style.item}>
              <Text>名称</Text>
            </View>
          </TouchableOpacity>
          <View style={style.line}></View>
          <TouchableOpacity>
            <View style={style.item}>
              <Text>时间</Text>
            </View>
          </TouchableOpacity>
          <View style={style.line}></View>
          <TouchableOpacity>
            <View style={style.item}>
              <Text>大小</Text>
            </View>
          </TouchableOpacity>
          <View style={style.line}></View>
          <TouchableOpacity>
            <View style={style.item}>
              <Text>类型</Text>
            </View>
          </TouchableOpacity>
        </View>
      </BottomSheet>
    </>
  );
};
